Skip to content

fix: Fixed scrollbar in example output frame (cherry-pick from #745) - #1431

Merged
doradocodes merged 1 commit into
processing:v1from
Nwakaego-Ego:fix/scrollbar-example-frame
Aug 3, 2026
Merged

fix: Fixed scrollbar in example output frame (cherry-pick from #745)#1431
doradocodes merged 1 commit into
processing:v1from
Nwakaego-Ego:fix/scrollbar-example-frame

Conversation

@Nwakaego-Ego

Copy link
Copy Markdown
Contributor

Fixes #716

This is a clean cherry-pick of the relevant fix from #745 by @Its-sunny69 whose branch had carried over unrelated commits.

The fix removes the hardcoded width and height from the iframe in src/components/CodeEmbed/frame.tsx and lets it fill its parent container instead. Before this change, both the parent and the iframe were declaring the same size separately. Now, only the parent controls the size, which removes the confusion that was likely causing Chrome to show unnecessary scrollbars at certain zoom levels.

Note: I could not reproduce the bug locally or on the live site. I also found that index.jsx line 94 already has overflow-hidden on the parent container, which may explain why the bug is hard to reproduce consistently. The fix is still worth merging as it makes the code cleaner.

@doradocodes

Copy link
Copy Markdown
Contributor

@Nwakaego-Ego Since this component is used often, can you double check this change on some of the other pages?
For instance:
https://p5js.org/examples/animation-and-variables-mobile-device-movement/ <- should have a scrollbar on the first example

@Nwakaego-Ego

Copy link
Copy Markdown
Contributor Author

@Nwakaego-Ego Since this component is used often, can you double check this change on some of the other pages? For instance: https://p5js.org/examples/animation-and-variables-mobile-device-movement/ <- should have a scrollbar on the first example

Hi @doradocodes, I checked the following locally

examples/animation-and-variables-mobile-device-movement/ scrollbar is still present
examples/animation-and-variables-drawing-lines/ no scrollbar
examples/shapes-and-color-color-wheel/ no scrollbar
examples/animation-and-variables-animation-with-events/ no scrollbar

Only the Mobile Device Movement example has a scrollbar. All other examples display without scrollbars.

@doradocodes
doradocodes merged commit 32a38a3 into processing:v1 Aug 3, 2026
7 checks passed
@doradocodes

Copy link
Copy Markdown
Contributor

@Nwakaego-Ego Looks good, let's also cherry-pick this fix into main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scrolls in example code output frame seems unnecessary

3 participants